home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / Java / kinst351a.exe / data1.cab / plugin_samples / KawaPlugin5.java < prev    next >
Encoding:
Java Source  |  2000-02-17  |  858 b   |  32 lines

  1. import java.util.*;
  2. import com.tektools.kawa.plugin.*;
  3.  
  4. /** 
  5.  * This class sets the file and project images to checkin or checkout state. Please 
  6.  * recompile the file after changing the value of the variable checkFile from 0 to
  7.  * to 1 or 2.
  8.  */
  9. public class KawaPlugin5
  10. {
  11.     public static void main(String[] args)
  12.     {
  13.         KawaApp.out.clearWindow();
  14.         KawaApp.out.showWindow(true);
  15.         KawaProject project = KawaApp.getCurrentProject();
  16.         if (project != null)
  17.         {
  18.             int status = project.getSCMStatus();
  19.             status++;
  20.             if (status > KawaApp.SCMSTATUS_CHECKEDOUT)
  21.                 status=0;
  22.             project.setSCMStatus(status);    
  23.             Enumeration fileEnum = project.enumerateAllFiles();
  24.             while(fileEnum.hasMoreElements())
  25.             {
  26.                 KawaFile file = (KawaFile)fileEnum.nextElement();                
  27.                 if (file != null)
  28.                     file.setSCMStatus(status);
  29.             }
  30.         }
  31.     }
  32. }